package controller.gui.informationpanel;

import controller.Controller;
import controller.StratumLevelListener;
import event.numberevent.NumberEvent;
import gui.StrataOverviewPanel;

/**rappresenta una classe di supporto al <tt>MapInformationController</tt> per 
 * visualizzare lo strato corrente in modifica dall'utente sulla GUI (tramite un apposito pannello)
 * 
 * @author koldar
 * @version 1.0
 */
public final class CurrentStratumNotifier extends Controller implements StratumLevelListener{

	private StrataOverviewPanel strataPanel;
	
	public CurrentStratumNotifier(StrataOverviewPanel panel){
		super();
		this.strataPanel=panel;
		this.stratum.addNumberListener(this);
	}
	@Override
	public void currentStratumChanged(NumberEvent<Integer> arg0) {
		this.strataPanel.setCurrentStratum(this.stratum.getValue());
	}

}
